﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Visitor;

namespace ASTClass
{
    class TypeAST : TerminalAST
    {
        public TypeAST() : base() { name = "Type"; }
        public TypeAST(AST parent) : base(parent) { name = "Type"; }

        public override AST Clone()
        {
            TypeAST ast = new TypeAST();
            ast.operators = operators;
            foreach (AST c in children)
                ast.children.Add(c.Clone());

            return ast;
        }

        #region Visitor pattern

        public override void Accept(IVisitor visitor)
        {
            visitor.Visit(this);
        }

        #endregion Visitor pattern
    }
}
